package com.consumer.order.feign;

import com.goods.entity.goods;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.persistence.criteria.CriteriaBuilder;
import java.util.List;

@FeignClient(name="goods",path = "/goods")
public interface goodsFeign {
    //根据商品id查询某个商品
    @RequestMapping("/find/{gid}")
    goods findOne(@PathVariable("gid") Integer gid);
    //查询所有商品
    @RequestMapping("/find")
    List<goods> findAll();
}
